//
//  ResignViewController.m
//  SweetComics
//
//  Created by dlios on 15-1-28.
//  Copyright (c) 2015年 LeeZhe. All rights reserved.
//

#import "ResignViewController.h"
#import "LoginViewController.h"
@interface ResignViewController ()

@end

@implementation ResignViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    // 注册页面
    
    self.title = @"注册";
    
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,nil]];
    
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 100) / 2, 84, 100, 120)];
    _imageView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:self.imageView];
    [_imageView release];
    
    self.name = [[UITextField alloc]initWithFrame:CGRectMake(20, 224, self.view.frame.size.width - 40, 30)];
    _name.borderStyle = UITextBorderStyleRoundedRect;
    _name.placeholder = @"昵称";
    [self.view addSubview:self.name];
    [_name release];
    
    self.email = [[UITextField alloc] initWithFrame:CGRectMake(20, 274, self.view.frame.size.width - 40, 30)];
    _email.borderStyle = UITextBorderStyleRoundedRect;
    _email.placeholder = @"邮箱";
    [self.view addSubview:self.email];
    [_email release];
    
    self.createPassWord = [[UITextField alloc]initWithFrame:CGRectMake(20, 324, self.view.frame.size.width - 40, 30)];
    _createPassWord.borderStyle = UITextBorderStyleRoundedRect;
    _createPassWord.placeholder = @"创建密码（6-16位）";
    [self.view addSubview:self.createPassWord];
    [_createPassWord release];
    
    self.rePassWord = [[UITextField alloc] initWithFrame:CGRectMake(20, 374, self.view.frame.size.width - 40, 30)];
    _rePassWord.borderStyle = UITextBorderStyleRoundedRect;
    _rePassWord.placeholder = @"确认密码";
    [self.view addSubview:self.rePassWord];
    [_rePassWord release];
    
    self.confirm = [UIButton buttonWithType:UIButtonTypeSystem];
    _confirm.frame = CGRectMake(20, 424, self.view.frame.size.width - 40, 30);
    _confirm.backgroundColor = [UIColor colorWithRed:0 green:0.5 blue:1 alpha:0.7];
    _confirm.layer.cornerRadius = 5;
    _confirm.tintColor = [UIColor whiteColor];    // 按钮字颜色
    [_confirm setTitle:@"确认" forState:UIControlStateNormal];
    [_confirm addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.confirm];
    
}

// 确认按钮方法
- (void)buttonAction:(UIButton *)button
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (void)dealloc
{
    [_imageView release];
    [_name release];
    [_email release];
    [_createPassWord release];
    [_rePassWord release];
    [_confirm release];
    [super dealloc];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
